package com.jacky.iot.handler;

import io.vertx.mqtt.MqttEndpoint;
import io.vertx.mqtt.MqttTopicSubscription;
import io.vertx.mqtt.messages.MqttPublishMessage;
import io.vertx.mqtt.messages.MqttSubscribeMessage;
import io.vertx.mqtt.messages.MqttUnsubscribeMessage;

import java.util.Set;

public interface MqttHandler {
    void handleConnection(MqttEndpoint endpoint);

    void handlePublish(MqttEndpoint endpoint, MqttPublishMessage message);

    void handleSubscribe(MqttEndpoint endpoint, Set<MqttTopicSubscription> topics, MqttSubscribeMessage message);

    void handleUnsubscribe(MqttEndpoint endpoint, Set<String> topics, MqttUnsubscribeMessage message);
}
